<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="content-language" content="en-us">
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<title>Creating your project</title>
	<link href="../help.css" type="text/css" rel="stylesheet">
<script language="JavaScript">
function newWin(url) {
	window.open(url, 'install_cdt', 'width=750, height=700, menubar=no, toolbar=no, status=no, resizable=yes, location=no, scrollbars=yes');
}
</script>
</head>
<body> 

<div role="main"><h1>Creating a Makefile project</h1>  

<p>
This tutorial describes the process of creating a new C++ project that includes a makefile, and debugging the program.</p>
<p>You need to create a project to contain your source code and related files. A  project has an associated builder
that can incrementally compile source files as  they are changed.</p> 

<p>To create a project:</p> 

<ol>
	<li>Select <strong>File &gt; New &gt; Project</strong>.
<p><br>When you create a new project, you are required to specify the project type. This project type will determine the toolchain, data, and tabs that the CDT uses/displays.</p><br>
<li>Select the type of project to create. For this tutorial, expand the <strong>C/C++</strong> folder and select <strong>C++ Project</strong>.
	<br><p>The <strong>C++ Project</strong> wizard opens. <a href="javascript:void(0)" onClick="newWin('../images/cdt_w_basic19.png')">Click here to see an illustration.</a></p><br>
<p>By default, the CDT filters the <strong>Toolchain</strong> and <strong>Project types</strong> that currently display in those lists are based on the language support for the C++ Project wizard you selected for this tutorial.</p><br>
<li>In the <strong>Project name</strong> field, type HelloWorld.
<li>Leave the <strong>Use Default Location</strong> option selected.  
	<p><br>Next, you want to select the type of project to create. In the New CDT Project Wizard, you can choose from the following project types:</p>
	<ul>
	<li><strong>Executable</strong> - Provides an executable application. This project type folder contains three templates.</p>
	<ul>
	<li><strong>Hello World C++ Example</strong> provides a simple C++ Hello World application with main().
	<li><strong>Hello World ANSI C Example</strong> provides a simple C Hello World application with main().
	<li><strong>Empty Project</strong> provides a single source project folder that contains no files.
	<p>After you select this template, the result is a project with only the meta-data files required for the project type. 
	You are expected to  provide source files for the project's target.</p>
	</ul>
	<p>The makefile for the <strong>Executable</strong> project type is automatically created by the CDT.</p>
<p>&nbsp;</p>
		<li><strong>Shared Library</strong> - An executable module that is compiled and linked separately. When you create a project that uses a shared library (libxx.so), you define your shared library's project as a Project Reference for your application. For this project type, the CDT combines object files together and joins them so they're relocatable and can be shared by many processes. Shared libraries are named using the format
 libxx.so.<var>version</var>, where
<var>version</var> is a number with a default of 1. The
libxx.so file usually is a symbolic link to the
latest version. The makefile for this project type is automatically created by the CDT.
		<li><strong>Static Library</strong> - A collection of object files that you can link into another application (libxx.a). The CDT combines object files (i.e. *.o)
into an archive (*.a) that is directly linked into an
executable. The makefile for this project type is automatically created by the CDT.
		<li><strong>Makefile Project</strong> - Creates an empty project without the meta-data files. This selection is useful for importing and modifying existing makefile-based projects; a new makefile is not created for this project type. 
	</ul> 
	
<p>By default, the CDT filters the <strong>Toolchain</strong> and <strong>Project types</strong> that currently display in those lists  based on the language support for the C++ Project wizard you selected for this tutorial.
<p>&nbsp;</p>
<li>From the <strong>Project types</strong> list, expand <strong>Makefile project</strong> and select <strong>Empty Project</strong>. 
This project lets you enter the source file and the makefile yourself.

<li>Select a required toolchain from the <strong>Toolchain</strong> list. 
<p>A toolchain is a set of tools (such as a compiler, linker, and assembler) intended to build your project.
Additional tools, such as a debugger, can be associated with a toolchain.<br>
There can be several toolchains available, depending on the compilers installed on your system.
</p>

</li>
<li>Click <strong>Next</strong>.
<li>(Optional) On the <strong>Select Configurations</strong> page, Click <strong>Advanced Settings</strong>.
<ul> 
<li>Expand <strong>C/C++Build > Settings</strong>. Click the <strong>Binary Parsers</strong> tab.
<p><br><a href="javascript:void(0)" onClick="newWin('../images/cdt_w_binparser01.png')">Click here to see an illustration.</a></p><br>
</p>
</li>
<li>In the <strong>Binary Parser</strong> list, select the error parser that is appropriate for your platform.
Other project settings can be modified here as well.  The default selection is probably OK.

<br>
<p>To ensure the accuracy of the C/C++  Projects view and the ability to successfully
run and debug your programs, selecting the correct parser is important. After
you select the correct parser for your development environment and build your
 project, you can view the components of the .o file in the C/C++ Projects
view. You can also view the contents of the .o file in the C/C++ editor.
</p><br>Click <strong>OK</strong> to close the Project Properties window.</li>
</ul>

<li>Click <strong>Finish</strong>.</li>
<li>If a message box prompts you to change perspectives, click <strong>Yes</strong>.
</li>
</ol>  

<p>Your new project displays in the Project Explorer view. 
Your project is empty because you have not yet created
files for your project. 
You may see an error since there is nothing to build yet for your project.
You can now start writing the code for your HelloWorld
program.</p>  

<p><strong>Tip:</strong> You can view and modify the properties of your
HelloWorld project at any time by right-clicking on the project in the <strong>Project Explorer</strong> 
view and clicking Properties.</p>  <p><a style="text-decoration: none" href="cdt_w_newcpp.htm"><img
src="../images/ngnext.gif" height="16" width="16" alt="Next Icon"></a> <a href="cdt_w_newcpp.htm"><strong>
Next: Creating your C++ file</strong></a></p>  <p>For more information
about:</p>  <ul>
<li>Projects, see <strong>Workbench User Guide > Concepts > Workbench  > Resources
</strong></li>
<li>The workspace, see <strong>Workbench User Guide  > Tasks > Upgrading Eclipse
</strong></li>
</ul>  <p><img src="../images/ngconcepts.gif" alt="Related concepts" height="21" width="143"
> <br> <a href="../concepts/cdt_c_over_cdt.htm">CDT overview</a><br> <a href="../concepts/cdt_c_projects.htm">
CDT projects</a><br> <a href="../concepts/cdt_c_proj_file_views.htm">Project file views
</a></p> <p><img src="../images/ngtasks.gif" alt="Related tasks" height="21" width="143"
> <br> <a href="../tasks/cdt_o_proj_files.htm">Working with C/C++ project files</a></p> <p><img
src="../images/ngref.gif" alt="Related reference" height="21" width="143" > <br> <a
href="../reference/cdt_o_proj_prop_pages.htm">C/C++ Projects view</a></p>  

<p><img src="../images/ng00_04a.gif" ALT="QNX Copyright Statement" ></p>

</div></body>
</html>